package edu.biwu.test;

import edu.biwu.sms.StudentManagementSystem02;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.IOException;

import static org.junit.Assert.*;

public class smsTest02 {
private  static StudentManagementSystem02 sms;
    @BeforeClass
    public static  void initData() throws IOException {
        sms = new StudentManagementSystem02();
        sms.loadStudentsFromFile("E:\\JAVA\\oop\\day02-oop-03\\day25-junit-reflect-enum\\src\\小学生信息01.txt");
    }
    @Test
    public void showAllStudents() {
        sms.showAllStudnet();
    }

    @Test
    public void writeRankedStudentsToFile() throws IOException {
        sms.writeRankedStudentsToFile("E:\\JAVA\\oop\\day02-oop-03\\day25-junit-reflect-enum\\src\\总分排名.txt");
    }

    @Test
    public void getScoreStatisticsBySubject() {
        System.out.println(sms.getScoreStatisticsBySubject("语文"));
    }

    @Test
    public void findStudentWithHighestScore() {
        System.out.println(sms.findStudentWithHighestScore("数学"));
    }

    @Test
    public void sortByTotalScore() {
        sms.sortByTotalScore();
        sms.showAllStudnet();
    }

    @Test
    public void randomRollCall() {
        System.out.println(sms.randomRollCall());
    }
}